package cn.chengpengper.nacos.client.convert;

import org.apache.commons.lang3.StringUtils;

public class LongConverter extends AbstractPropertyConverter<Long> {
    @Override
    Long convert(String property) {
        if (StringUtils.isEmpty(property)) {
            return null;
        }
        try {
            return Long.valueOf(property);
        } catch (Exception e) {
            throw new IllegalArgumentException("Cannot convert String [" + property + "] to Long");
        }
    }
}
